function fig_insured(delta_grid, ins_dep, unins_dep, ins_acc, unins_acc, optfig)

if optfig.plotfig == 1
    
    [fontname,~,lw,folder,color,style,~,~,fontsize_tit,~,fontsize_lab,fontsize_leg] = fn_optfig(optfig);
    
    f1 = figure('Units','inches','Position',[0 0 12 4]);
    
    subplot(1,2,1)
    plot(delta_grid,ins_dep,  'Color',color{1},'LineStyle',style{1},'LineWidth',lw); hold on;
    plot(delta_grid,unins_dep,'Color',color{2},'LineStyle',style{2},'LineWidth',lw);
    title('Insured/Uninsured Deposits','interpreter','latex','FontSize',fontsize_tit,'FontName',fontname);
    xlabel('Deposit Insurance $(\delta)$','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    axis([min(delta_grid),max(delta_grid),0,1]);
    grid; box off;
    
    legend({'Insured Deposits', 'Uninsured Deposits'},...
        'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','east')
    legend('boxoff')
    
    subplot(1,2,2)
    plot(delta_grid,ins_acc,  'Color',color{1},'LineStyle',style{1},'LineWidth',lw); hold on;
    plot(delta_grid,unins_acc,'Color',color{2},'LineStyle',style{2},'LineWidth',lw);
    title('Fully/Partially Insured Accounts','interpreter','latex','FontSize',fontsize_tit,'FontName',fontname);
    xlabel('Deposit Insurance $(\delta)$','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname);
    axis([min(delta_grid),max(delta_grid),0,1]);
    grid; box off;
    
    legend({'Fully Insured Accounts','Partially Insured Accounts'},...
        'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','east')
    legend('boxoff')
    
    name = 'insured_uninsured';
    print(f1,'-depsc','-painters','-noui','-r600',[folder,name,'.eps'])
    
    if optfig.close == 1; close(who('f')); end
    
end
